projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d739ec
)
base: half-float reference zero initialize lsb
author
Massimo Valentini
<mvalentini@src.gnome.org>
Sat, 16 Jan 2016 18:33:25 +0000
(19:33 +0100)
committer
Øyvind Kolås
<pippin@gimp.org>
Sat, 16 Jan 2016 18:41:38 +0000
(19:41 +0100)
babl/base/type-half.c
patch
|
blob
|
history
diff --git
a/babl/base/type-half.c
b/babl/base/type-half.c
index ac20ec92d6b7d19ac54b32721d3dfa67ddefe60e..5c0d079dd49e27bcaa4ccf34e3573fd3606e45e5 100644
(file)
--- a/
babl/base/type-half.c
+++ b/
babl/base/type-half.c
@@
-138,6
+138,8
@@
static void halfp2doubles(void *target, void *source, long numel)
int32_t xes;
int e;
+ if (next)
+ *xp = 0;
xp += next; // Little Endian adjustment if necessary
if( source == NULL || target == NULL ) // Nothing to convert (e.g., imag part of pure real)
@@
-175,7
+177,9
@@
static void halfp2doubles(void *target, void *source, long numel)
*xp++ = (xs | xe | xm); // Combine sign bit, exponent bits, and mantissa bits
}
}
- *xp++ = 0; // Skip over and zero the remaining 32 bits of the mantissa
+ xp++; // Skip over and zero the remaining 32 bits of the mantissa
+ if (!next)
+ *xp = 0;
}
}